import service from './http'
import qs from 'qs'

const get = (url, params) => service.get(url, { params });
const post = (url, data) => service.post(url, data);
const postForm = (url, data) => service.post(url, qs.stringify(data), {
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    
})
const postFile = (url, data) => service.post(url, data, {
    headers: {
        'Content-Type': 'multipart/form-data'
    }
})
export default {
    get,
    post,
    postForm,
    postFile
}